<html>
<head>
<script>
window.onload = function() {
    document.getElementById("input").focus();
}
</script>
</head>
<body style="background-color: red;">
<input id="input" type="checkbox" checked/>
</body>
</head>
</html>